import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.nio.charset.StandardCharsets;

public class clinet {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("10.23.109.199",9998);
        InputStream inputStream = socket.getInputStream();
        byte[] c =new byte[1024];
        int c2=0;
        while ((c2=inputStream.read(c))!=-1){
            System.out.println(new String(c,0,c2));
        }
        OutputStream outputStream = socket.getOutputStream();
        outputStream.write("林佳烁最帅".getBytes(StandardCharsets.UTF_8));
        outputStream.write("莫西莫西，呼叫黄泽凯，收到请回复".getBytes(StandardCharsets.UTF_8));
        socket.shutdownOutput();
        inputStream.close();
        outputStream.close();
        socket.close();
    }
}
